package com.bbj.inheritance;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: jack_yang
 * @Date: 2024/4/25
 * @Description: addition and subtraction
 */
public class Teacher extends People {
    public String getTeacherCode() {
        return teacherCode;
    }
    public void setTeacherCode(String teacherCode) {
        this.teacherCode = teacherCode;
    }
    private String teacherCode;
    private Integer age = 30;


    public void showAge() {
        System.out.println("teacher类中的年龄是：" + this.age);
        System.out.println("People类中的年龄是：" + super.age);
    }


    public void teach() {
        super.sleep();
        System.out.println("上课");
    }

}
